#!/usr/bin/env bash
set -e
workdir=$(cd $(dirname $0); pwd)
echo "workdir = ${workdir}"
pushd $workdir
python3 ./main.py
python3 ./Mergetxt.py
# libime_pinyindict sougou.txt sougou.dict
# if [ -f  "${HOME}/.local/share/fcitx5/pinyin/dictionaries/sougou_bk.dict" ]; then
#     echo "sougou_bk exist"
#     cp sougou.dict ${HOME}/.local/share/fcitx5/pinyin/dictionaries
#     popd
#     exit
# fi
# if [ -f  "${HOME}/.local/share/fcitx5/pinyin/dictionaries/sougou.dict" ]; then
#     echo "sougou exist, need back up"
#     mv ${HOME}/.local/share/fcitx5/pinyin/dictionaries/sougou.dict ${HOME}/.local/share/fcitx5/pinyin/dictionaries/sougou_bk.dict
# fi
# cp sougou.dict ${HOME}/.local/share/fcitx5/pinyin/dictionaries
popd